package com.golf.comms.server;

import javax.management.MBeanServer;

import org.apache.log4j.Logger;
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.ServerInvocationHandler;
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.callback.InvokerCallbackHandler;

/**
 * 
 * 
 * @author gfloodgate
 */
public class UserInvocationHandler implements ServerInvocationHandler
{
	
	/** The logger instance. */
	private static final Logger log = Logger.getLogger(UserInvocationHandler.class);
	
	
	/**
	 * {@inheritDoc}
	 */
	public Object invoke(final InvocationRequest request) throws Throwable
	{
		switch((UserInvocationCommand)request.getParameter())
		{
			case REGISTER_USER:
			{
				
			}
			case AUTHENTICATE_USER:
			{
				
			}
		}
		
		return null;
	}
	
	
	/**
	 * {@inheritDoc}
	 */
	public void addListener(final InvokerCallbackHandler handler)
	{
		// Do nothing.
	}

	
	/**
	 * {@inheritDoc}
	 */
	public void removeListener(final InvokerCallbackHandler handler)
	{
		// Do nothing.
	}

	
	/**
	 * {@inheritDoc}
	 */
	public void setInvoker(final ServerInvoker invoker)
	{
		// Do nothing.
	}

	
	/**
	 * {@inheritDoc}
	 */
	public void setMBeanServer(final MBeanServer server)
	{
		// Do nothing.
	}
	
}
